package rickyGame.controller.state
{
	import flash.events.MouseEvent;
	import flash.geom.Point;
	
	import ricky.game.Actor;
	import ricky.utils.TimeServer;
	import ricky.utils.Utils;
	
	import rickyGame.controller.Controller;
	import rickyGame.game.GameState;
	import rickyGame.game.Player;
	import rickyGame.game.action.ArriveAttackRangeAct;
	import rickyGame.game.action.MsgAct;
	import rickyGame.game.skill.SkillData;
	import rickyGame.game.skill.SkillEffectTargetType;
	import rickyGame.net.MsgType;
	import rickyGame.net.WorkQueue;
	import rickyGame.ui.Cursor;

	/**
	 * 
	 * 选择了UI中的攻击图标，或者点了A键
	 */
	public class AttackState extends  ManaState
	{
		public function AttackState(par:*=null)
		{
			super();
			this.par=par;
			super.state=3;
		}
		
		override public function create():void
		{
			Controller.instance.actor.skills.currSkill=null;
//			GameState.inst.me.skills.currSkill=null;
			Cursor.show(Cursor.ATTACK);
		}
		
		override public function operate(par:*):void
		{
			var me:Player=Controller.instance.actor;
			
			me.skills.currSkill=me.skills.attack1;
			super.operate(par);
			Controller.instance.switchSate(new StopSate());

		}
//		
	}
}